package com.lmj.controller;

import com.lmj.dto.DataResponse;
import com.lmj.service.UserStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userStatus")
public class UserStatusController {

    @Autowired
    private UserStatusService userStatusService;

    // 用户每日签到
    @RequestMapping("/usersign")
    public DataResponse userSign(@RequestBody String request) {
        return userStatusService.userSign(request);
    }

    // 获取用户该月签到日期
    @RequestMapping("/signinfo")
    public DataResponse getSignInfo(@RequestBody String request) {
        return userStatusService.getSignInfo(request);
    }

    // 设置学习总时长，本次登录学习时长
    @RequestMapping("set_words_time")
    public DataResponse setWordsTime(@RequestBody String request) {
        return userStatusService.setWordsTime(request);
    }
}
